import { createBrowserRouter, Navigate } from "react-router-dom";
import Home from "../pages/home";
import Test from "../pages/test";
import NotPage from "../pages/NotFind";
import MobxPage from "../pages/Mobx/MobxPage";
import ReduxPage from "../pages/Redux/ReduxPage";
import ReduxTest from "../pages/ReduxText/ReduxTest";
const AppRouter = createBrowserRouter([
  {
    path: "",
    element: <Home />,

    children: [
      {
        path: "",
        element: <Navigate to="test" />,
      },
      {
        path: "test",
        element: <Test />,
      },
      {
        path: "mobx",
        element: <MobxPage></MobxPage>,
      },
      {
        path: "redux",
        element: <ReduxPage></ReduxPage>,
      },
      {
        path: "reduxTest",
        element: <ReduxTest></ReduxTest>,
      },
      {
        path: "*",
        element: <NotPage />,
      },
    ],
  },
]);
export default AppRouter;
